package com.guigu.eduservice.controller;

import com.guigu.common.utils.R;
import com.guigu.eduservice.entity.Permission;
import com.guigu.eduservice.entity.RolePermission;
import com.guigu.eduservice.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 权限表（存储系统所有功能权限） 前端控制器
 * </p>
 *
 * @author janecraft
 * @since 2025-09-27
 */
@RestController
@RequestMapping("/eduservice/permission")
public class PermissionController {

    @Autowired
    private PermissionService permissionService;


    @GetMapping("/getPermissionAll")
    public R getPermissionAll(){
        List<Permission> list = permissionService.list();
        return R.ok().data("list",list);
    }

}
